#include<iostream>
using namespace std;
const int N=23;
int h[N],elem[2*N],ne[2*N],n,id;
void insert(int x){
	id++;
	elem[id]=x;
	int p=(x%N+N)%N;
	ne[id]=h[p];
	h[p]=id;
}
bool find(int x){
	int p=(x%N+N)%N;
	for(int i=h[p];i;i=ne[i]){
		int u=elem[i];
		if(u==x){
			return true;
		}
	}
	return false;
}
int main(){
	cin>>n;
	while(n--){
		int op,x;
		cin>>op>>x;
		if(op==1){
			insert(x);	
		}else{
			if(find(x)) cout<<"yes"<<endl;
			else cout<<"no"<<endl;
		}
	}
	return 0;
}
